package cn.wolfcode.crm.mapper;

import cn.wolfcode.crm.domain.Customer;
import cn.wolfcode.crm.domain.Employee;
import cn.wolfcode.crm.query.QueryObject;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

import java.util.List;

public interface CustomerMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Customer record);

    Customer selectByPrimaryKey(Long id);

    List<Customer> selectAll();

    int updateByPrimaryKey(Customer record);

    List<Customer> list(QueryObject queryObject);

    List<Employee> selectEmployeeByRoleSn(String... sns);

    String selectByTel(String tel);

    List<Customer> selectCustomer();

    void updateStatus(@Param("id") Long id, @Param("status") Integer status);

    void updateBySellerId(@Param("customerId") Long customerId, @Param("newSellerId") Long newSellerId);
}